package com.bsj.sipgateway.task;

import com.bsj.sipgateway.sip.transmit.cmd.impl.SIPCommander;

import java.util.TimerTask;

/**
 * @Description 录像任务计时器
 * 设备触发报警要下发录像命令，录一个10s钟的视频
 * @Author zhaoyang
 * @Date 2024/7/22 14:52
 */
public class RecordTimerTask extends TimerTask {

    private Long did;

    private String recordCmdStr;

    private Integer channelSerial;

    private SIPCommander sipCommander;

    @Override
    public void run() {
        // 此处写10s后需要执行的任务
        sipCommander.recordCmd(did, recordCmdStr, channelSerial);

    }

    public RecordTimerTask() {

    }

    public RecordTimerTask(Long did, String recordCmdStr, Integer channelSerial, SIPCommander sipCommander) {
        this.did = did;
        this.recordCmdStr = recordCmdStr;
        this.channelSerial = channelSerial;
        this.sipCommander = sipCommander;
    }
}
